package com.battery.system.domain;

import com.battery.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * VIP申请对象 ws_member
 *
 * @author battery
 * @date 2021-01-22
 */
@Table(name = "ws_member")
public class Member {


    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private String id;

    /**
     * 机柜SN
     */
    @Excel(name = "机柜SN")
    private String devSn;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private String appUserId;

    /**
     * 用户类型 微信小程序 1 支付宝小程序 2
     */
    @Excel(name = "用户类型 微信小程序 1 支付宝小程序 2")
    private Long userType;

    /**
     * 用户姓名
     */
    @Excel(name = "用户姓名")
    private String trueName;

    /**
     * 用户手机号
     */
    @Excel(name = "用户手机号")
    private String phone;

    @Transient
    private String storeName;

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    /**
     * 平台-项目ID
     */
    @Excel(name = "平台-项目ID")
    private String projectId;

    /**
     * 合作商ID
     */
    @Excel(name = "合作商ID")
    private String partnerId;

    /**
     * 商户ID
     */
    @Excel(name = "商户ID")
    private String merchantId;

    /**
     * 门店ID
     */
    @Excel(name = "门店ID")
    private String storeId;

    /**
     * 是否超级VIP 0 否 1 是
     */
    @Excel(name = "是否超级VIP 0 否 1 是")
    private Integer isSuper;

    /**
     * VIP每单前X分钟免费
     */
    @Excel(name = "VIP每单前X分钟免费")
    private Integer orderFreeMinute;

    /**
     * 每天免费订单数
     */
    @Excel(name = "每天免费订单数")
    private Integer dailyOrderLimit;

    /**
     * 审批状态 0 未审批 1 已通过 2 已拒绝
     */
    @Excel(name = "审批状态 0 未审批 1 已通过 2 已拒绝")
    private Integer auditStatus;

    /**
     * 审批时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalTime;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remarks;

    /**
     * 上级合作商ID
     */
    @Excel(name = "上级合作商ID")
    private String superiorId;


    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


    private Integer isDelete;


    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setDevSn(String devSn) {
        this.devSn = devSn;
    }

    public String getDevSn() {
        return devSn;
    }

    public void setAppUserId(String appUserId) {
        this.appUserId = appUserId;
    }

    public String getAppUserId() {
        return appUserId;
    }

    public void setUserType(Long userType) {
        this.userType = userType;
    }

    public Long getUserType() {
        return userType;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public String getTrueName() {
        return trueName;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setIsSuper(Integer isSuper) {
        this.isSuper = isSuper;
    }

    public Integer getIsSuper() {
        return isSuper;
    }

    public void setOrderFreeMinute(Integer orderFreeMinute) {
        this.orderFreeMinute = orderFreeMinute;
    }

    public Integer getOrderFreeMinute() {
        return orderFreeMinute;
    }

    public void setDailyOrderLimit(Integer dailyOrderLimit) {
        this.dailyOrderLimit = dailyOrderLimit;
    }

    public Integer getDailyOrderLimit() {
        return dailyOrderLimit;
    }

    public void setAuditStatus(Integer auditStatus) {
        this.auditStatus = auditStatus;
    }

    public Integer getAuditStatus() {
        return auditStatus;
    }

    public void setApprovalTime(Date approvalTime) {
        this.approvalTime = approvalTime;
    }

    public Date getApprovalTime() {
        return approvalTime;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setSuperiorId(String superiorId) {
        this.superiorId = superiorId;
    }

    public String getSuperiorId() {
        return superiorId;
    }


    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("devSn", getDevSn())
                .append("appUserId", getAppUserId())
                .append("userType", getUserType())
                .append("trueName", getTrueName())
                .append("phone", getPhone())
                .append("projectId", getProjectId())
                .append("partnerId", getPartnerId())
                .append("merchantId", getMerchantId())
                .append("storeId", getStoreId())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("isSuper", getIsSuper())
                .append("orderFreeMinute", getOrderFreeMinute())
                .append("dailyOrderLimit", getDailyOrderLimit())
                .append("auditStatus", getAuditStatus())
                .append("approvalTime", getApprovalTime())
                .append("remarks", getRemarks())
                .append("superiorId", getSuperiorId())
                .toString();
    }
}
